package middleware

import (
	"fmt"
	"lib/mall/v1/lib"
	"strings"
)

// AuthMiddleware 登录权限验证
func AuthMiddleware(ctx *lib.Context) {
	// Bearer
	token := strings.TrimLeft(ctx.GetHeader("Authorization"), "Bearer ")
	if len(token) > 0 {
		fmt.Println("Authorization:::::::", token)
	}
	ctx.Next()

}
